(makefile-mode): Set SYNTAX-BEGIN member
authorEli Zaretskii <eliz@gnu.org>
Tue, 6 Feb 2001 17:08:19 +0000 (17:08 +0000)
committerEli Zaretskii <eliz@gnu.org>
Tue, 6 Feb 2001 17:08:19 +0000 (17:08 +0000)
of `font-lock-defaults' to `backward-paragraph' rather than nil.

lisp/progmodes/make-mode.el

index adeec830ab413a36aeac37d8b7d7d8fd12248efc..72e2e863a76262fbaa651e232f165d9a8f2b4aa0 100644 (file)
@@ -587,7 +587,11 @@ makefile-special-targets-list:
 
   ;; Font lock.
   (make-local-variable 'font-lock-defaults)
-  (setq font-lock-defaults '(makefile-font-lock-keywords))
+  (setq font-lock-defaults
+       ;; SYNTAX-BEGIN set to backward-paragraph to avoid slow-down
+       ;; near the end of a large buffer, due to parse-partial-sexp's
+       ;; trying to parse all the way till the beginning of buffer.
+       '(makefile-font-lock-keywords nil nil nil backward-paragraph))
 
   ;; Add-log.
   (make-local-variable 'add-log-current-defun-function)